﻿using System;
using System.Collections.Generic;
using System.Text;
using SqlSugar;
namespace MyBlog.Model
{
  /*
   文章
   */
  public class BlogNews:BaseId
  {
    [SugarColumn(ColumnDataType ="nvarchar(30)")]
    public string Title { get; set; } //文章标题
    [SugarColumn(ColumnDataType ="text")]
    public string Content { get; set; } //内容
    public DateTime Time { get; set; } //时间
    public int BrowseCount { get; set; } //浏览量
    public int LikeCount { get; set; } //点赞

    public int TypeId { get; set; } //文章类型Id
    public int WriterId { get; set; } //作者Id

    
    // 层级关系查询，这部分不映射到数据库
    [SugarColumn(IsIgnore =true)]
    public TypeInfo TypeInfo { get; set; }

    [SugarColumn(IsIgnore = true)]
    public WriterInfo WriterInfo { get; set; }
  }
}
